* {
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(to top,#85cbcc,#f9e2ae);
    height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
}

.container a {
    position: relative;
    /* display: block; */
    width: 140px;
    height: 60px;
    margin: 40px;
    /* 此属性将行内的高度调整成了60px，所以使得内容上下居中了 */
    line-height: 60px;
    /* 字符居中 */
    text-align: center;
    color: aqua;
    font-size: 20px;
    text-decoration: none;
    filter: hue-rotate(calc(var(--i) * 60deg));
}

.container a::before,
.container a::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid aqua;
    transition: all 0.3s ease-in-out 0.3s;
}
/* 将伪元素的右部和下部设为零 */
.container a::before {
    top: 0;
    left: 0;
    border-right: 0;
    border-bottom: 0;
}
/* 将伪元素的上部和左部设为零 */
.container a::after {
    right: 0;
    bottom: 0;
    border-left: 0;
    border-top: 0;
}

.container a:hover {
    background-color: aqua;
    color: #000;
    /* 发光效果以及模糊度加成50px */
    box-shadow: 0 0 50px aqua;
    /* below是下倒影，1px是倒影的元素相隔的距离 最后是渐变颜色 */
    -webkit-box-reflect: below 1px
        linear-gradient(transparent,rgba(0,0,0,0.3));
        /* 添加延迟时间，形成动画效果 */
        transition-delay: 0.5s;
}
/* 设置获得光标事件，形成动画效果 */
.container a:hover::before,
.container a:hover::after {
    width: 138px;
    height: 58px;
}
